﻿<phone:PhoneApplicationPage 
    x:Class="BathroomLocator.Phone.Pages.BathroomLocationDetailViewPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False" xmlns:my="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps">

    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot">
        <controls:Panorama Title="{StaticResource ApplicationNameString}">

            <!--Panorama item one-->
            <controls:PanoramaItem Header="details">
                <ScrollViewer Grid.Row="0" Margin="12, 0, 12, 0">
                    <StackPanel>
                        <!-- Facility Name -->
                        <StackPanel Margin="0, 0, 0, 10">
                            <TextBlock Text="Facility Name" FontSize="{StaticResource PhoneFontSizeNormal}" FontFamily="{StaticResource PhoneFontFamilyNormal}" VerticalAlignment="Top" LineHeight="31" LineStackingStrategy="BlockLineHeight" Foreground="{StaticResource PhoneSubtleBrush}" TextWrapping="Wrap" Margin="12, 0, 12, -5"/>
                            <TextBlock x:Name="FacililtyNameTextBox" Text="{Binding Path=BathroomLocation.FacilityName, Mode=TwoWay}" Margin="24, 0, 12, -5"/>
                        </StackPanel>

                        <!-- Street Address -->
                        <StackPanel Margin="0, 0, 0, 10">
                            <TextBlock Text="Street Address" FontSize="{StaticResource PhoneFontSizeNormal}" FontFamily="{StaticResource PhoneFontFamilyNormal}" VerticalAlignment="Top" LineHeight="31" LineStackingStrategy="BlockLineHeight" Foreground="{StaticResource PhoneSubtleBrush}" TextWrapping="Wrap" Margin="12, 0, 12, -5"/>
                            <TextBlock x:Name="StreetAddressTextBox" Text="{Binding Path=BathroomLocation.AddressLine1, Mode=TwoWay}" Margin="24, 0, 12, -5"/>
                        </StackPanel>

                        <!-- City -->
                        <StackPanel Margin="0, 0, 0, 10">
                            <TextBlock Text="City" FontSize="{StaticResource PhoneFontSizeNormal}" FontFamily="{StaticResource PhoneFontFamilyNormal}" VerticalAlignment="Top" LineHeight="31" LineStackingStrategy="BlockLineHeight" Foreground="{StaticResource PhoneSubtleBrush}" TextWrapping="Wrap" Margin="12, 0, 12, -5"/>
                            <TextBlock x:Name="CityTextBox" Text="{Binding Path=BathroomLocation.City, Mode=TwoWay}" Margin="24, 0, 12, -5"/>
                        </StackPanel>

                        <!-- State -->
                        <StackPanel Margin="0, 0, 0, 10">
                            <TextBlock Text="State" FontSize="{StaticResource PhoneFontSizeNormal}" FontFamily="{StaticResource PhoneFontFamilyNormal}" VerticalAlignment="Top" LineHeight="31" LineStackingStrategy="BlockLineHeight" Foreground="{StaticResource PhoneSubtleBrush}" TextWrapping="Wrap" Margin="12, 0, 12, -5"/>
                            <TextBlock x:Name="StateTextBox" Text="{Binding Path=BathroomLocation.State, Mode=TwoWay}" Margin="24, 0, 12, -5"/>
                        </StackPanel>

                        <!-- Zip Code -->
                        <StackPanel Margin="0, 0, 0, 10">
                            <TextBlock Text="Zip Code" FontSize="{StaticResource PhoneFontSizeNormal}" FontFamily="{StaticResource PhoneFontFamilyNormal}" VerticalAlignment="Top" LineHeight="31" LineStackingStrategy="BlockLineHeight" Foreground="{StaticResource PhoneSubtleBrush}" TextWrapping="Wrap" Margin="12, 0, 12, -5"/>
                            <TextBlock x:Name="ZipCodeTextBox" Text="{Binding Path=BathroomLocation.ZipCode, Mode=TwoWay}" Margin="24, 0, 12, -5"/>
                        </StackPanel>

                        <!-- Rating -->
                        <StackPanel Margin="0, 0, 0, 10">
                            <TextBlock Text="Rating" FontSize="{StaticResource PhoneFontSizeNormal}" FontFamily="{StaticResource PhoneFontFamilyNormal}" VerticalAlignment="Top" LineHeight="31" LineStackingStrategy="BlockLineHeight" Foreground="{StaticResource PhoneSubtleBrush}" TextWrapping="Wrap" Margin="12, 0, 12, -5"/>
                            <TextBlock x:Name="RatingTextBox" Text="{Binding Path=BathroomLocation.Rating, Mode=TwoWay}" Margin="24, 0, 12, -5"/>
                        </StackPanel>

                        <!-- Comments -->
                        <StackPanel Margin="0, 0, 0, 10">
                            <TextBlock Text="Comments" FontSize="{StaticResource PhoneFontSizeNormal}" FontFamily="{StaticResource PhoneFontFamilyNormal}" VerticalAlignment="Top" LineHeight="31" LineStackingStrategy="BlockLineHeight" Foreground="{StaticResource PhoneSubtleBrush}" TextWrapping="Wrap" Margin="12, 0, 12, -5"/>
                            <TextBlock x:Name="CommentTextBox" Text="{Binding Path=BathroomLocation.Comment, Mode=TwoWay}" Margin="24, 0, 12, -5"/>
                        </StackPanel>
                        
                        <Button Content="Edit"
                                Click="OnEditClick"/>
                    </StackPanel>
                </ScrollViewer>
            </controls:PanoramaItem>

            <!--Panorama item two-->
            <controls:PanoramaItem Header="map">
                <Grid>
                    <my:Map Name="bathroomMap"
                            CredentialsProvider="{StaticResource BingMapsAPIKey}"
                            CopyrightVisibility="Collapsed"
                            LogoVisibility="Collapsed"
                            ZoomBarVisibility="Visible">
                        
                    </my:Map>
                </Grid>
            </controls:PanoramaItem>
            
            <controls:PanoramaItem Header="picture">
                <Grid>
                    <Image x:Name="BathroomImage" HorizontalAlignment="Center" VerticalAlignment="Center"
                               Stretch="Fill" Height="400" Width="400"
                               Source="{Binding Path=BathroomLocation.ImagePath}"/>
                </Grid>
            </controls:PanoramaItem>
        </controls:Panorama>
    </Grid>

    <!--Panorama-based applications should not show an ApplicationBar-->

</phone:PhoneApplicationPage>